/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Hw808
 */
import java.io.*;
import java.net.*;

public class Client {

    public static void main(String argv[]) {
        BufferedReader in = null;
        PrintStream out = null;
        Socket socket = null;
        String message;
        try {
            // open a socket connection
            socket = new Socket("localhost", 4000);
            // Apre i canali I/O
            in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            out = new PrintStream(socket.getOutputStream(), true);
            //invia il contenuto XML al server
            out.print("<MSG_IVEF>\n" +
"<Header MsgRefId=\"3b592d30-7bd5-45c7-9ef2-d12fea20b8c4\" Version=\"0.2.5\"/>\n" +
"<Body>\n" +
"<Ping TimeStamp=\"2014-10-15T21:57:07.138Z\"/>\n" +
"</Body>\n" +
"</MSG_IVEF>");
            out.flush();
            // Legge dal server
            //message = in.readLine();
           // System.out.print("Messaggio Ricevuto : " + message);
            out.close();
            in.close();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
